home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1988 April / 1988-04.d64 / dgraph painter (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  101 lines

  1. 10 printchr$(14);chr$(8):lx%=4:ly%=195
  2. 20 poke50913,1:poke50959,1:poke50918,0
  3. 30 poke50964,0:poke50923,0:poke50969,0
  4. 40 @2:x%=4:y%=195
  5. 50 if x%<0 then x%=319
  6. 60 if x%>319 then x%=0
  7. 70 if y%<0 then y%=199
  8. 80 if y%>199 then y%=0
  9. 90 c1%=5:c2%=6:@4,x%,y%:if(peek(251)<>0)thenc1%=6:c2%=5
  10. 100 @c1%,x%,y%
  11. 110 xt%=peek(56320)and31
  12. 120 jx%=sgn(xt%and4)-sgn(xt%and8)
  13. 130 jy%=sgn(xt%and2)-sgn(xt%and1)
  14. 140 jf%=1-sgn(xt%and16)
  15. 150 if(jx%<>0)or(jy%<>0)goto200
  16. 160 getc$:c%=peek(653)and4
  17. 170 if(c$="")and(c%=0)goto110
  18. 180 if(c%=0)goto220
  19. 190 goto380
  20. 200 if(jf%<>0)thenc2%=c1%
  21. 210 @c2%,x%,y%:x%=x%+jx%:y%=y%+jy%:goto50
  22. 220 cx%=x%/8:cy%=y%/8:@10,cx%,cy%,c$
  23. 230 if(peek(251)=0)goto260
  24. 240 if(cx%>38)thenx%=-4:if(cy%>0)theny%=y%-8
  25. 250 x%=x%+8:goto50
  26. 260 c%=asc(c$):if(c%<>13)goto290
  27. 270 @c2%,x%,y%:x%=4:if(y%>7)theny%=y%-8
  28. 280 goto50
  29. 290 if(c%=29)thenjx%=8:goto210
  30. 300 if(c%=157)thenjx%=-8:goto210
  31. 310 if(c%=145)thenjy%=8:goto210
  32. 320 if(c%=17)thenjy%=-8:goto210
  33. 330 if(c%=19)then@c2%,x%,y%:x%=4:y%=195:goto50
  34. 340 if(c%=147)then@3:x%=4:y%=195:goto50
  35. 350 if(c%<>20)goto110
  36. 360 @c2%,x%,y%:if(x%>7)thenx%=x%-8:cx%=x%/8:cy%=y%/8:@10,cx%,cy%," "
  37. 370 goto50
  38. 380 print"[147]";
  39. 390 print"                [207]ptions                 [146]";
  40. 400 print" g -> [199]et a [198]ile"
  41. 410 print" s -> [211]ave a [198]ile"
  42. 420 print" p -> [208]rint [211]creen"
  43. 430 print" d -> [196]raw a [204]ine"
  44. 440 print" f -> [198]ill a [210]egular [208]olygon"
  45. 450 print" u -> [213]ppercase"
  46. 460 print" l -> [204]owercase"
  47. 470 print" n -> [206]ormal [195]haracters"
  48. 480 print" r -> [210]everse [195]haracters"
  49. 490 print" c -> [195]lear [211]creen"
  50. 500 print" q -> [209]uit"
  51. 510 print"[197]nter [207]ption:[146] ";:@1
  52. 520 getc$:if(c$="")goto520
  53. 530 printc$+""
  54. 540 if(c$<>"g")goto580
  55. 550 c$="":input"[199]et [198]ilename";c$
  56. 560 if(c$="")thenprint"[147][199]et a [198]ile [193]borted -- [197]nter [195]ommand":goto390
  57. 570 print"[199]etting [198]ile...":@13,c$:@2:goto50
  58. 580 if(c$<>"s")goto620
  59. 590 c$="":input"[211]ave [198]ilename";c$
  60. 600 if(c$="")thenprint"[147][211]ave a [198]ile [193]borted -- [197]nter [195]ommand":goto390
  61. 610 print"[211]aving [198]ile...":@c2%,x%,y%:@12,c$:@c1%,x%,y%:@2:goto110
  62. 620 if(c$<>"p")goto670
  63. 630 print"[211]ure [208]rint (y/n)? "
  64. 640 getc$:if(c$="")goto640
  65. 650 if(c$<>"y")thenprint"[147][208]rint [193]borted -- [197]nter [195]ommand":goto390
  66. 660 print"[208]rinting...":@c2%,x%,y%:@14:@c1%,x%,y%:@2:goto110
  67. 670 if(c$<>"d")goto800
  68. 680 print"              [196]raw [207]ptions              [146]"
  69. 690 print" s -> [211]et [211]tarting [208]oint"
  70. 700 print" d -> [196]raw the [204]ine"
  71. 710 print"[197]nter [196]raw [207]ption:[146] ";
  72. 720 getc$:if(c$="")goto720
  73. 730 printc$
  74. 740 if(c$<>"s")goto760
  75. 750 lx%=x%:ly%=y%:c2%=c1%:@2:goto110
  76. 760 if(c$<>"d")thenprint"[147][204]ine [193]borted -- [197]nter [195]ommand":goto390
  77. 770 s%=256:input"[204]ine [211]tyle (0-255)";s%
  78. 780 if((s%<0)or(s%>255))thenprint"[147][196]raw [204]ine [193]borted -- [197]nter [195]ommand":goto390
  79. 790 @2:@4,lx%,ly%:@7,x%,y%,s%:lx%=x%:ly%=y%:goto50
  80. 800 if(c$<>"f")goto880
  81. 810 print"[201]s [205]arker in [208]olygon (y/n)? ";
  82. 820 getc$:if(c$="")goto820
  83. 830 printc$
  84. 840 if(c$<>"y")thenprint"[147][198]ill [193]borted -- [197]nter [195]ommand":goto390
  85. 850 s%=128:input"[198]ill [211]tyle (0-127)";s%
  86. 860 if((s%<0)or(s%>127))thenprint"[147][198]ill [193]borted -- [197]nter [195]ommand":goto390
  87. 870 @2:@6,x%,y%:@9,x%,y%,s%:goto50
  88. 880 if(c$="u")thenc$=chr$(142):@10,0,0,c$:@2:goto110
  89. 890 if(c$="l")thenc$=chr$(14):@10,0,0,c$:@2:goto110
  90. 900 if(c$="n")thenc$=chr$(146):@10,0,0,c$:@2:goto110
  91. 910 if(c$="r")thenc$=chr$(18):@10,0,0,c$:@2:goto110
  92. 920 if(c$="c")then@3:@2:goto110
  93. 930 print"              [209]uit [207]ptions              [146]"
  94. 940 print" j -> [210]eturn to [202][207][217]"
  95. 950 print" b -> [199]o to [194][193][211][201][195]"
  96. 960 print"[197]nter [209]uit [207]ption:[146]"
  97. 970 getc$:if(c$="")goto970
  98. 980 if(c$="j")then@2:goto110
  99. 990 if(c$="b")then@c2%,x%,y%:print"[147]":@1:printchr$(142);chr$(9):end
  100. 1000 print"[147][209]uit [193]borted -- [197]nter [195]ommand":goto390
  101.